package com.ipartek.pruebas.bbddaccessP10;


//Abstract class DAO Factory
public abstract class DAOFactoryP10 {

// List of DAO types supported by the factory
public static final int TXT = 1;
public static final int ODBC = 2;
public static final int MYSQL = 3;
//...

// There will be a method for each DAO that can be 
// created. The concrete factories will have to 
// implement these methods.
public abstract AlumnoDAOP10 getCustomerDAO();
public abstract CursoDAOP10 getAccountDAO();

//...

public static DAOFactoryP10 getDAOFactory(
   int whichFactory) {

 switch (whichFactory) {
   case TXT: 
       return new ODBCDAOFactoryP10();
   case ODBC   : 
       return new TxtDAOFactoryP10();      
   case MYSQL  : 
       return new MySQLDAOFactoryP10();
  // ...
   default           : 
       return null;
 }
}
}